<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>注册界面</title>
		<script type="text/javascript">
		function $(id){
			return document.getElementById(id);
		}
	
		function checkform(){
			var ps=$("ps");
			var reps=$("reps");
			if(ps.value==""){
				alert("密码不能为空");
				return false;
			}else
				{
					if(ps.value.length<6||ps.value.length>10){
						alert("密码应该在6到10位之间");
					}
					
				else
					{
						if(reps.value==""){
						alert("请输入重复密码");
						return false;
						}
						else if(reps.value!=ps.value){
							alert("密码确认错误");
							return false;
						}
					
					
					}
				}
			return true;
		}
			
		</script>
	</head>
	<body>
		<div style="height: 100px;">

		</div>
		<div id="registerblock" align="center">
			<h1>注册界面</h1>
			<form action="registersuccess.html" method="get" onsubmit="return checkform()" >
				<table border="0" cellspacing="" cellpadding="">
					<tr>邮箱  
						<input type="email" name="" id="em" value="" /><br>
						密码  
						<input type="password" name="" id="ps" value="" /><br>
						重复密码
						<input type="password" name="" id="reps" value="" /><br>
						性别
						<input type="radio" name="gender" value="男" checked="checked" /> 男
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="radio" name="gender" value="女" /> 女<br>
							<input type="submit" id="sub" name="" />
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>
